<template>
	<view class="content">



		<table>
<tr>
	<td><input type="text" v-model="CangKu" style="background-color: antiquewhite;"></td>
	<td><button @click="ss()">搜索</button></td>
</tr>
			<tr>
				<td>入库单号</td>
				<td>单据类型</td>
				<td>仓库</td>
				<td>制单时间</td>
				<td>入库时间</td>
				<td>入库数量</td>
				<td>入库金额</td>
				<td>制单人</td>
				<td>操作</td>
			</tr>

			<tr v-for="v in list">
				<td>{{v.RukuOn}}</td>
				<td>{{v.OnType}}</td>
				<td>{{v.CangKu}}</td>
				<td>{{v.ZdTime}}</td>
				<td>{{v.RkTime}}</td>
				<td>{{v.RkNum}}</td>
				<td>{{v.RkPrice}}</td>
				<td>{{v.UserName}}</td>
				<td>操作</td>
			</tr>
		</table>
<uni-pagination title="标题文字" show-icon="true" :total="allpage" :current="page" :page-size="size" @change="fy"></uni-pagination>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				page : 1,
				size : 3,
				allpage : 0,
				CangKu:""
			}
		},
		onLoad() {
			this.get_data()
		},
		methods: {
			fy(e){
				console.log(e.current)
				this.page = e.current
				this.get_data()
			},
			ss(){
				this.page = 1,
				this.get_data()
			},
			get_data() {
				uni.request({
					url: 'http://127.0.0.1:8080/list', //仅为示例，并非真实接口地址。
					data: {
						page : this.page,
						size : this.size,
						CangKu:this.CangKu,
						
						
					},
					header: {
						'content-type': 'application/x-www-form-urlencoded' //自定义请求头信息
					},
					success: (res) => {
						console.log(res.data)
						this.list = res.data.Data
						this.allpage = res.data.Count

					}
				});
			},
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>